The present invention relates to watermarking of a digitized image, especially to a method and device to attach a watermark into a digitized image file in the spatial domain.
In the field of digitized data processing, the term xe2x80x9cwatermarkxe2x80x9d indicates adding particular data into a digital data file, so that the particular data, after special treatment, may appear for purposes of indication or certification when it is necessary.
Generally speaking, the requirements for a watermark, which is embedded in a digitized image, include capacity, imperceptibility and robustness, as described below:
Capacity: A preferred watermarking technology is one which is able to add a watermark into a digital file, instead of establishing a separate watermark file in addition to the digital file. A useful watermarking technology shall be able to allocate sufficient space in the digital file in which a digital watermark file containing a substantial amount of data may be embedded or hidden.
Imperceptibility: The watermark data embedded in a digital file shall not be identified or detected by observers who receive, process or observe the digital file or the converted format of the digital file. On the one hand, the watermark may cause damages or distortions to the digital file to be embedded. It is necessary to provide a technology to embed a watermark into a digital file, such that the damages or distortions are not perceptible to human senses. On the other hand, a watermark must be confidential. The watermark may not be perceptible to human senses, whereby detection, decoding, revision or even erase of the watermark may be avoided.
Robustness: Any digital file is subject to data processing such as compression, conversion, transformation and transmission, when it is transmitted, processed and stored. During the processing, noises, data and/or even other watermark will be added into the digital file for all kinds of reasons. A useful watermarking technology shall be able to protect the watermark from damages, destroy or disappearance during the processes, despite the influence of the above-mentioned factors.
Due to the useful functions of watermarks, such as identification and certification, the watermarking technology has been considered of great economic values in 21st century wherein digital data may be widely used. Especially when all kinds of media data are unlimitedly reproduced and distributed in the internet, watermarks are useful in the protection of copyrighted works from being unlawfully infringed. It can thus be expected that the watermarking technology will provide enormous contribution to the electronic commerce in the future.
In the field of the watermarking technology, Schyndel et al.""s xe2x80x9cleast significant bitxe2x80x9d (LSB) watermarking technology, which they published in 1994, was recognized as beginner of this field. Schyndel et al. provided an improved watermarking technology by adding an xe2x80x9cm-sequencexe2x80x9d watermark in the conventional LSB coding of a digital file. This technology provided a method to embed watermark data into the most invisible bits of a digital image file. The watermark data were obtained from an m-sequenced coding. Receiver of the digital file embedded with the watermark may resolve the watermarked file with the same m-sequence coding, such that the watermark may be obtained. In 1996, Wolfgang et al. further provided a 2-dimensional coding for Schyndel et al.""s technology.
When the digital file to be watermarked is an image file, the watermark may be embedded into the image file in its spatial domain or in its transformation domain.
In the conventional art, as watermarking in the spatial domain is concerned, Matsui and Tanaka""s watermarking technology is recognized as leading. This technology related to embedding a watermark into a gray leveled image file, a dithered binary image file, a fax image file, a color still image file or a video image file, as follows:
At first, a digital image file is obtained. The difference in gray level between every two adjacent pixels is calculated to generate a matrix of differences in gray levels. A cipher key table containing values of difference in gray levels and their corresponding output codes (0 or 1) is used to generate a matrix of output codes, based on the matrix of difference values.
Later, the watermark is converted into a string of 0""s or 1""s. The string is converted into a matrix with a format same as or relative to that of the matrix of output codes. A watermark matrix is thus obtained. The watermark matrix is then compared with the matrix of codes. If the values of 0 or 1 at a corresponding position in the two matrixes are different, the difference value at the corresponding position in the matrix of difference values is replaced by a difference value which has the same output code and which position is most close to the difference value represented by said code in the cipher key. After the process, a matrix of difference values embedded with a watermark is obtained. The matrix of differences may be reduced to a watermarked image, while the watermark brings very little distortion to the image.
Receivers of the matrix of difference values or the matrix of the pixel values may use the cipher key table to reduce the watermark. (See Mitchell D. Swanson et al., xe2x80x9cMulti-media data-embedding and watermarking technologiesxe2x80x9d, Proceedings of IEEE, 86(6); 1064-1087, June 1998.)
Among the technologies in embedding watermarks into digital files in the transformation domain, the technology disclosed by Cox et al. was recognized as pioneer. See Ingemar J. Cox et al., xe2x80x9cSecure spectrum watermarking for multimediaxe2x80x9d, IEEE Trans. on Image Processing, 6(12): 1673-1687, June 1997. This technology related to watermarking of DCT (discrete cosine transform) processed images.
In Cox et al.""s invention, watermark data are embedded into the middle-band frequencies of a DCT processed image file. The reason why Cox et al. selected the middle band to embed the watermark was partially because greater robustness may be obtained. In the middle band of a DCT image file, the perceptual significance of the image is greater so that damages or distortions to the image because of the watermarking may be tolerable.
In Cox et al.""s invention, the watermark was generated by a Gaussian random number generator. The watermark may be represented by a one dimensional matrix X, X=[x1, x2, . . . xn], wherein xi=0 or 1. A digital file V (V=[v1, v2, . . . , vm]) is embedded with the watermark file X, with the following equation, to obtain a watermarked file Vxe2x80x2, Vxe2x80x2=[v1 xe2x80x2, v2xe2x80x2, . . . , vmxe2x80x2]
vixe2x80x2=vi(1+xi xcex1)
wherein i=1, 2, . . . , n; vixe2x80x2 represents DCT coefficients of the watermarked file; vi represents DCT coefficients of the original digital file; xi represents elements of the watermark file generated by the Gaussian random number generator; and a represents a scalar vector.
After the watermarked digital file is received, the original digital file and the watermark file may be obtained by reverse DCT processing of the watermarked file. In other words, the original digital file and the watermarked digital file are both DCT processed. Substrate the watermarked file with the original digital file and a file of DCT coefficients which is similar to the watermark file may be obtained. Reverse DCT process the obtained watermark file and the watermark may be reduced.
After Cox et al.""s invention, several studies were made by researchers in this field and a variety of watermarking technologies in the DCT transformation domain were developed and disclosed.
The objective of this invention is to provide a watermarking method and a watermarking device to automatically embed a watermark into a digital data file.
Another objective of this invention is to provide a systemized watermarking technology to embed a watermark into a digital image file.
Another objective of this invention is to provide a watermarking technology whereby watermark embedded in a digital image file may not be easily detected.
Another objective of this invention is to provide a watermarking technology whereby watermark embedded in a digital image file has a relative high robustness.
According to this invention, a watermarking method and device to embed a digitized watermark into a digital image file in the spatial domain is disclosed. In the watermarking technology of this invention, the digitized watermark is first error corrected to enhance its robustness. The digital image file to be embedded with the digitized watermark is first processed such that capacity of each element of the digital image file is calculated. The capacity of an element of the digital image file represents the highest value of tolerance for an element of the watermark to be added to the said element of the digital image file. Elements of the digital image file to which watermark elements may be added are selected and their addresses are recorded. Elements of the watermark file are then inserted into the selected addresses in sequence and the watermark is thus modulated. After modulation the digitized watermark is embedded into the digital file by distributing the modulated elements of the watermark into the selected addresses.